<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<script type="text/javascript">
	$(function(){
		//防止加载的出的图片失真
		//imgZomm('filehead${param.index}');
	});
	$(".fileHead").live("click",function(){
		var id = $(this).attr('id');
		index=id.split("_"); 
		$("#uploadFile"+index[1]).click();
	});
</script>

<div id="fileview${param.index}" style="width: 200px; height: 100px; border: none; overflow: hidden;">
	
	<img id="filehead${param.index}" width="200" height="100" border="0"
		 style="filter: filehead${param.index}id:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);"
		 <c:choose>
			 <c:when test="${!empty param.imgPath}">
				 src=http://mengzhu.oss-cn-shenzhen.aliyuncs.com/${param.imgPath}
			 </c:when>
			 <c:otherwise>
			 	src='${path}/images/dfupload.png'
			 </c:otherwise>
		 </c:choose> 
		 
	/>

</div>
<br />
<input id="uploadFile${param.index}" type="file" name="${param.name}" onchange="previewImage(this,'filehead${param.index}','fileview${param.index}', '#hidCheckChooseFile${param.index}')" />
<input type="hidden" name="${param.hidName}" value="${param.picId}" />
<!-- required参数为空或者为真时，才需要进行非空验证 -->
<input type="hidden" id="hidCheckChooseFile${param.index}" value="${param.imgPath}" 
<c:if test="${empty param.required || param.required == true}">class="{required:true,messages:{required:'请选择图片'}}"</c:if> />
